home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Space & Astronomy
/
Space and Astronomy (October 1993).iso
/
mac
/
programs
/
satrack
/
SS4EXE.ZIP
/
SEESAT4.DOC
< prev
next >
Wrap
Text File
|
1992-01-05
|
35KB
|
891 lines
SEESAT4.DOC
SEESAT earth satellite tracking program - documentation
Paul Hirose - 1992 Jan 5
Introduction
SEESAT is an earth satellite orbit prediction program for visual
observers. It computes the information needed to plot a satellite
in a star atlas and observe it with binoculars.
SEESAT uses the SGP4 orbit prediction model, which is the primary
NORAD model for near-earth satellites. (I can provide the SGP and
SGP8 models on request.) SEESAT is compatible with the NORAD 2-Line
element set format.
SEESAT is written in the C language. For maximum portability, it
assumes only a teleprinter terminal. Since it is a text-only,
command-driven program, SEESAT can be ported to any system with a C
compiler. All source code is public domain without restrictions. You
are welcome to use my code in your own projects, compile and
distribute SEESAT executables, create custom versions of SEESAT, etc.
I distribute SEESAT as C source code only, relying on others to create
the executables.
Primary distribution points for SEESAT are the Celestial BBS in Dayton
(513-427-0674) and the CSS BBS in Toronto (416-458-5907). Both
systems are open 24 hours. These are also good places to reach me if
you have questions about SEESAT.
Warnings
Users of former SEESAT versions should be aware of some changes.
The program no longer prompts for observer's position at startup.
Height, latitude, longitude, and time zone must be entered via
commands. The program will NOT warn if you've forgotten to set any of
these values!
Observer's height is now measured in KILOMETERS, not feet.
Time zone is entered in the same format used to enter time in the rest
of the program, instead of the former decimal hours. In addition, the
sign has reversed, so negative (west) longitudes now have negative
time zones.
These changes should not cause any inconvenience, since SEESAT now
provides for an automatic initialization file.
New Features
These are all new with this release:
A command to select display of all predictions, not just the ones
above the horizon.
A command to select display of satellite longitude with respect to
your meridian instead of Greenwich.
Satellite longitude and latitude are displayed to the nearest .1
degree.
The prediction table has a new column for estimated magnitude, which
is computed from absolute magnitude, range, and phase angle. Absolute
magnitude input is automatic if SEESAT senses a Molczan-format element
set, or it may be entered with a command.
Latitude, longitude, height, and time zone are input by commands
instead of by answering questions at startup. This lets you change
them without exiting the program.
A new command, NEXT, loads the next satellite in the elements file.
You can tell SEESAT how many characters to use from the name line in
the orbital element file. This can prevent it from taking Molczan's
size data as part of the satellite name.
The + character in element sets has a checksum value of 0, in
accordance with the latest NORAD policy.
All orbital elements may be entered manually. The old SEESAT didn't
provide for satellite name or epoch
Automatic adjustment of a prelaunch element set, if you input the
assumed and actual launch times.
RUN executes a prediction run. (Old SEESAT didn't have an explicit
run command.)
A prediction run may be specified in terms of START and SPAN, in
addition to the old START/STOP and CENTER/SPAN modes.
I have added provision to interrupt a prediction run and return
control to the keyboard. Routines are included for the Laser C (Atari
ST) and Turbo C (IBM clone) compilers.
SEESAT is now bilingual: CENTER and CENTRE are equivalent commands.
Commands REPEAT, PRINT?, and SKIP allow you to create an iterating
command line.
A new command, EX <filename>, will execute the specified batch file.
This causes the command interpreter to get its lines from the file
instead of the keyboard.
RET transfers control from batch file to keyboard or vice versa.
At startup, SEESAT looks for file SEESAT.BAT. If present, it will be
executed as a batch file. You may have this file set SEESAT to your
location and perform any other initialization tasks.
Sample Session
This is from an actual SEESAT session. It may be used as a quick
check for proper functioning of your program.
A>seesat4
SEESAT (SGP4) 1992 Jan 4 by Paul Hirose
>lat 34.915 lon -117.933 height .73 zone -800
>open b:noaa9.ele
complete; 1 satellites found
>load "noaa 9"
NOAA 9
1 15427U 84123 A 91289.49913910 .00000538 00000-0 30856-3 0 8532
2 15427 99.1650 305.9266 0016081 84.5452 275.7530 14.13148923352652
>start 1991 oct 27 1750 span 136 step 12
NOAA 9 1991 OCT 27
time az el R.A. dec range sun mag alt lat lon
1850:00 286 38 17h 7m 31 50' 1265 13 * 1.2 841 36.6N 127.5W
>center 1850 span 18 step 4
NOAA 9 1991 OCT 27
time az el R.A. dec range sun mag alt lat lon
1842:00 185 2 20h43m -53 0' 3181 12 * 2.6 848 8.7N 120.0W
1846:00 203 22 19h39m -29 0' 1755 12 * 1.5 845 22.6N 123.5W
1850:00 286 38 17h 7m 31 50' 1265 13 * 1.2 841 36.6N 127.5W
1854:00 330 11 13h11m 53 20' 2399 15 * 2.4 839 50.4N 132.9W
>para 1850
parallactic angle = 68
>sun 1850
az=270 el=-23
>moon 1850
az=44 el=-16
75% illuminated
>exit
Entering Commands
SEESAT asks no questions and has no menus. It is a command-driven
program. You enter a command at the > prompt and press RETURN.
SEESAT executes the command, possibly generating output, then returns
to the > prompt.
Multiple commands may be entered on one line. They will be executed
from left to right. Use one or more spaces to separate items on the
command line. E.g., to load satellite "Mir" from file 929.ELE, you
could do:
OPEN 929.ELE
LOAD MIR
or enter both commands on one line:
OPEN 929.ELE LOAD MIR
Up to 80 characters may be typed on a single line. Backspacing is
allowed to correct mistakes. SEESAT does not erase characters from
the screen as you backspace over them, but they ARE erased inside the
program. SEESAT will only execute the characters up to (but not
including) the cursor.
You may use lower or upper case. SEESAT converts the command line to
all upper case before executing it. I will use upper case in this
documentation.
Command Arguments
In the description of SEESAT commands, you'll see that most commands
must be followed by an "argument", i.e., an item for the command to
act on. The three most common types of argument are:
<number>
<time>
<date time>
I will now describe the format of these arguments.
The <number> argument is a just a single number. The following
examples should all be safe formats to use for <number>:
.001 13.78299201 35. 35 3.5e1 .256e-3
For example, the LAT command sets your latitude:
LAT 34.915
A <time> argument is in terms of minutes. If more than 2 digits are
present, it is considered hours and minutes. If a colon is present,
anything on the right of the colon is considered seconds. Leading
zeros are allowed but not required. E.g.:
1811:15 = 18h 11m 15s
1811:15.65 = 18h 11m 15.65s (decimal seconds are allowed)
1811 = 18h 11m 0s (seconds are optional)
0300 = 3h 0m 0s
300 = 3h 0m 0s (leading zeros are optional)
59:50 = 0h 59m 50s
30 = 0h 30m 0s
5 = 0h 5m 0s
:10 = 0h 0m 10s
:01 = 0h 0m 1s
:1 = 0h 0m 1s (leading zeros are optional)
:00.1 = 0h 0m .1s
:.1 = 0h 0m .1s (leading zeros are optional)
0 = 0h 0m 0s
The fields in a <time> are allowed to exceed "normal" bounds. Any
number up to 99 is legal for hours, minutes, or seconds. In addition,
seconds may have as many decimal places as desired. E.g., 460 (4h
60m) is a legal <time>. It is identical to 500. A more extreme
example is 9999:99, which is 99h 99m 99s.
The STEP command is an example of a command which requires a <time>
argument. For example,
STEP 12
sets the prediction run time step to 12 minutes.
Other SEESAT commands require a <date time> argument, which is
composed of year, month, day, and time. All digits of the year must
be given. Use the first 3 letters of the month name. The time part
of <date time> follows the same format as the <time> argument
described earlier.
The MOON command is an example of a command which takes a <date time>
argument. E.g.,
MOON 1991 DEC 28 1730
will cause SEESAT to display the moon's azimuth and elevation at the
given time.
The day part of a <date time> may be ANY integer. E.g.,
MOON 1991 JAN 0 1200
MOON 1990 DEC 31 1200
will give identical results, as will these commands:
MOON 1991 JAN 33 1200
MOON 1991 FEB 2 1200
You may omit year, year/month, or year/month/day, e.g.,
MOON 1991 JUN 12 1800
MOON JUN 12 1800
MOON 12 1800
MOON 1800
are all legal commands. The omitted part of the date will default
to the last value(s) you entered in a <date time>. All commands share
the same default date. For example, if you enter the commands
MOON JUN 11 2200
SUN 12 2200
MOON 2200
you will get the moon's position on June 11 at 2200, the sun's
position on June 12 at 2200, and the moon's position on June 12 at
2200. Since the year has not been specified, in all three cases it
will default to the last year you entered.
Note that you may omit the entire date from <date time>, but you
must always include the time!
There is no default date at program startup, so your first <date time>
must include the complete date. Remember to use the full year, not
just the last two digits.
Setup Commands
LAT <number> [degrees; negative if south]
LON <number> [degrees; negative if west]
HEIGHT <number> [kilometers; negative if below sea level]
These commands set SEESAT to your location.
At 1000 km (a typical viewing distance), a 10 mile error in your
position (16 km or .14 deg) causes a 1 deg error in the satellite
position predicted by SEESAT. That is for worst-case geometry, i.e.,
the error is at right angles to your line of sight. Therefore, it is
safe to omit the HEIGHT command if you're unsure of the correct value.
(The default value at program startup is zero.) There will be an
appreciable error only if you're at an unusually high altitude. Note
that height is KILOMETERS, not meters!
ZONE <time>
<time> argument equals (local time) - UTC. A negative sign is
permitted. E.g., for Pacific Standard Time:
ZONE -800 or
ZONE -0800
The ZONE value need not be an integral number of hours, e.g.,
Newfoundland standard time is 3h 30m behind UTC:
ZONE -330
Default ZONE at program startup is Greenwich time.
PRECESS <date time>
Controls the correction of Right Ascension and declination for
precession. PRECESS sets the final epoch. The epoch of the elements
is always used as the initial epoch. For 1950.0 or 2000.0
coordinates, respectively:
PRECESS 1950 JAN 0 2210
PRECESS 2000 JAN 1 1200
These are Greenwich times, so, strictly speaking, the PRECESS command
should be given before setting ZONE. But for all practical purposes
it doesn't matter. Precession is so slow there will be virtually no
error even if you miss by a full year. Over several decades, though,
it will build up to a significant level. For example, if your atlas
is 1950.0 and you neglect the PRECESS command, an error of up to 42
arc minutes can occur in your plot of a satellite's track. This is
perhaps four or five times worse than SEESAT's prediction accuracy
under good conditions!
The PRECESS value remains until you change it or exit SEESAT.
Default setting is 2000.0 at program startup.
MERIDIAN
The satellite longitudes in the prediction table may be computed
with respect to either Greenwich or your local meridian. MERIDIAN
toggles this mode, and informs you of the current mode. Default is
Greenwich.
ALL
Toggles SEESAT between normal mode (predictions below horizon
suppressed) and a mode which displays all predictions.
Element Set Loading Commands
OPEN <filename>
Opens the orbital element file. If an element file is already
open, that file will be closed first.
OPEN builds an index of the satellites in the file, using linked
blocks in RAM. Each block holds 50 satellites. Storage is requested
as needed at run time, so the size of the element file is limited only
by available memory. Assuming your system uses 4-byte longs and
2-byte pointers, each 50-satellite block uses 1352 bytes.
The index only contains the name of the satellite and its location
in the file. The elements are not read from the disk until you issue
the LOAD or NEXT command.
INDEX
Lists the satellites in the currently open file. If there is
more than one screenful, it will pause with a "more>" prompt. At this
prompt you may either press RETURN to continue the listing, or enter a
command (or commands) just as you would at the normal command prompt.
In that case, the listing is aborted and your commands are executed.
LOAD <name>
Loads the named satellite from the file you opened with the OPEN
command. If the name has spaces, enclose the name in quotes. A
closing quote is not required if the name is the last item on the
line, e.g., you can do
LOAD "COSMOS 1383" or
LOAD "COSMOS 1383
If the elements fail checksum, you'll get a warning but SEESAT will
let you use the elements.
Setting Run Parameters
START <date time>
STOP <date time>
SPAN <time>
CENTER <date time>
CENTRE <date time>
Set the parameters of the prediction run. CENTRE is identical to
CENTER. Any of these commands begins a prediction run automatically
if it's the last one on the command line.
STEP <time>
Controls size of time steps in the prediction run. A run begins
automatically if STEP is the last command on the line.
There are three modes for setting the time limits of a prediction run:
1. a start time and stop time
2. a start time and time span
3. a center time and time span
For example, these command lines generate indentical prediction runs:
START 1900 STOP 2100 STEP 10
START 1900 SPAN 200 STEP 10
CENTER 2000 SPAN 200 STEP 10
The order of the commands in the line doesn't matter. E.g.,
STEP 10 STOP 2100 START 1900
START 1900 STOP 2100 STEP 10
have the same effect.
You don't have to re-issue a command if its value hasn't changed. For
example, suppose you enter:
CENTER 2000 STEP 2 SPAN 8
and decide that the resulting table is satisfactory except that the
span should have been 12 minutes Enter:
SPAN 12
and a run will occur with the same CENTER and STEP values as before.
To change modes you must give both commands associated with the new
mode. For example, you do a run with these commands:
START 1730 STOP 1900 STEP 10
Then suppose you want a run starting at 1730, of 12-minute span, with
2-minute time steps. Enter:
START 1730 SPAN 12 STEP 2
You did START 1730 for the first run, so why do it again for the
second? Because you are changing modes. The first run was in
start/stop mode. You are changing to start/span for the second run,
so you must give both START and SPAN. If you had said:
SPAN 12 STEP 2
the program would have remained in start/stop mode. (Again, the order
of the commands on the line doesn't matter, as long as the required
commands are present.)
In center/span mode, the first prediction is always 1/2 SPAN before
the CENTER time, and of course the remaining predictions are spaced at
the STEP value you specified. This can cause unexpected results if
SPAN is not an even multiple of STEP. E.g., for
CENTER 1800 SPAN 5 STEP 1
the predictions will be for 1757:30, 1758:30, etc.
Since decimal seconds are allowed in <time> or <date time>, it is
possible to specify the time parameters of a run as finely as you
desire. I discuss SEESAT's time reckoning accuracy in the section
describing the prediction table.
Some Additional Orbital Element Commands
NEXT
Load the next satellite in the file, i.e., the one following the
satellite currently loaded. If you haven't yet loaded a satellite
from the open file, NEXT will load the first one. The file must be
opened with the OPEN command before NEXT can access it.
LENGTH <integer>
Sets maximum number of characters the OPEN command will consider
significant in the satellite name when building the index. The LENGTH
command must therefore be issued before OPEN, to have any effect. Any
number from 1 - 22 is allowed. Default is 22, and may be left alone
unless you're using a file such as Molczan's N2L series. In that
case, you'll want to reduce LENGTH to 15 to prevent SEESAT from using
the extra data as part of the satellite name. LENGTH is set to 22 if
you enter a number larger than 22.
AOP <number>
B <number>
E <number>
I <number>
MA <number>
MM <number>
MMDOT <number>
MMDOTDOT <number>
NAME <satellite name>
RAAN <number>
Allow you to manually enter orbital elements or modify elements
already loaded. Respectivly: argument of the perigee, BSTAR,
eccentricity, inclination, mean anomaly, mean motion, mean motion dot,
mean motion dot dot, name, Right Ascension of the ascending node.
Mean Motion dot and mean motion dot dot are used only by the SGP
model. The newer SGP4 model is the one I include with the standard
SEESAT package, so normally the MMDOT and MMDOTDOT commands have no
effect.
EPOCH <epoch>
Manually enter epoch of the orbital elements. Must be in NORAD
format: YYDDD.DDD... (use any number of decimal places). Unused
digits in the integer part of day number must be padded with spaces or
zeros. If spaces are used for padding, the number must be enclosed in
quotes. E.g.,
EPOCH 91003.52029891 or
EPOCH "91 3.52029891"
NOMINAL <date time>
ACTUAL <date time>
These commands adjust the epoch and RAAN of the currently
loaded elements for the difference between the nominal and actual
launch times. They are useful for correcting a prelaunch element
set. E.g.,
NOMINAL 19 1851 ACTUAL 1918
tells SEESAT that the currently loaded elements assume a launch on the
19th at 1851, but the launch actually occurred at 1918.
You can't use NOMINAL or ACTUAL by itself! If you use one, you
must also use the other or you'll get crazy results. The order of the
commands does not matter, and they don't have to be on the same line.
Just be sure that both commands have been given before starting a
prediction run.
The entered values are remembered. So you may, for example,
use NOMINAL just once, then experiment with different ACTUAL values.
Loading an element set (even reloading the same one) disables the
effect of NOMINAL and ACTUAL. Their values are still remembered,
however, so you may re-enable the adjustment by giving one or both
commands.
The NOMINAL and ACTUAL arguments may be for any time zone, as
SEESAT cares only about their time difference.
MAG <number>
For entering the absolute magnitude of a satellite. It will be
adjusted for range and illumination angle to generate the "mag" value
in the prediction table. Absolute magnitude is its magnitude at 1000
km and 50% illuminated (i.e., 90 degree phase angle).
Absolute magnitude input can be automatic during loading of the
elements from the file. If the first line of the element set (the
satellite name line) is longer than 32 characters, SEESAT assumes it's
a Molczan format line, and reads the magnitude. You can use the MAG
command to override the value if necessary.
MAGBIAS <number>
Bias to be applied to SEESAT's computed magnitude before display.
A negative sign is allowed. The default is zero.
If your absolute magnitudes assume a different range and/or
illumination than 1000 km and 50%, the MAGBIAS command will bring your
scale into coincidence with SEESAT's. If r and k are your assumed
standard conditions (in km and percent, respectively), set MAGBIAS to:
2.5 * log10 ((1000/r)^2 * k/50)
For example, if your absolute magnitude is for 1000 km range and 100%
illuminated, enter:
MAGBIAS .8
OFFSET <time>
Applies an offset to the epoch of the satellite elements, thereby
making the satellite come early or late in the predictions. Useful
for putting a satellite ahead of or behind schedule, to evaluate the
resulting track drift with respect to the stars. Also can be
used to adjust for any discrepancy noted between predicted and actual
times of passes. A negative sign is allowed on <time>. A negative
<time> will make the effective epoch EARLIER, and make the satellite
come EARLIER in your predictions.
If OFFSET is nonzero, an advisory of its value is printed at the
top of each prediction table.
OFFSET is reset to zero when an element set is loaded.
Flow Control Commands
The next three commands only work within the same command line.
PRINT?
If the last prediction run resulted in a line of data being
printed, execute the command to the right of PRINT?. Otherwise,
skip it. There must be at least one command after PRINT?.
REPEAT
Jump back to beginning of command line.
SKIP
Skip the command to the immediate right of SKIP. To be used
following PRINT?, to reverse the test. There must be at least one
command after SKIP.
Other Commands
SUN <date time>
MOON <date time>
Print the azimuth & elevation of the body at the given time. For
the moon, percentage of illumination is also given.
PARA <date time>
Print the parallactic angle at the predicted position of the
satellite for the given time. Parallactic angle is the direction of
celestial north, as seen in a binocular field of view. E.g., 0 =
straight up, 90 = 3 o'clock. This command allows you to examine your
star atlas plot and visualize the star field orientation you'll see
when you go outside.
RUN
Begin a prediction run, using the current time parameters. The
START, STOP, CENTER, SPAN, or STEP command automatically begins a
run if it is at the end of the command line. That is the normal way
to get a run. The RUN command is convenient if, for example, you load
a new element set and want a run without changing time parameters.
EX <filename>
Execute a batch file of commands. Any SEESAT command may appear
in a batch file. Multiple commands per line are allowed, just as if
you were entering the command line manually. EX itself may be in a
batch file. If encountered, it will close the current batch file and
begin executing the specified file. Control will not return to the
preceding file. I.e., you can chain batch files but not nest them.
RET
If encountered in a batch file, returns control to user. If
entered manually, resumes execution of the batch file.
HELP
Displays a help screen.
EXIT
Exit from SEESAT.
I have two final points to explain about the command interpreter.
First, it is legal to give the same command more than once in a line.
If you have entered a long command line, it is sometimes easier to
repeat a command than to backspace to correct an incorrect argument.
Second, your copy of SEESAT may have the ability to abort a prediction
run or execution of a batch file. I say "may" because there is no
portable way to implement this feature. There is provision to install
it in the program, and I've supplied routines for Turbo C (for IBM
clones) and Laser C (for the Atari ST). If your SEESAT was created
with either of these compilers, you can press any key during a
prediction run, execution of a command line (even an iterating one),
or execution of a batch file, and get the > prompt back.
Prediction Table
A table of predicted satellite positions is the main output of SEESAT:
NOAA 9 1991 OCT 27
time az el R.A. dec range sun mag alt lat lon
1845:00 196 15 19h59m -37 20' 2081 12 * 1.8 846 19.1N 122.6W
1846:00 203 22 19h39m -29 0' 1755 12 * 1.5 845 22.6N 123.5W
1847:00 215 29 19h14m -17 50' 1476 12 * 1.2 844 26.1N 124.4W
Time is the time of the prediction. The table value is rounded to the
nearest second but, internally, time is maintained to full precision.
For an IEEE double precision value (53-bit significand), this is about
30 microsecond precision in the context of SEESAT. Therefore, it's
practical to use split-second time steps in the table if you can keep
track of what entry goes with what time.
To reduce cumulative error, the time variable that is incremented
during prediction runs is based on the epoch of the element set, not
on 4713 BC as is the rest of SEESAT's time reckoning. This variable
would typically have a (IEEE double) precision of .2 or .3 nanosec.
Azimuth and elevation are rounded to the nearest degree. There is no
adjustment of elevation for refraction.
Right Ascension is rounded to the nearest minute, declination to the
nearest multiple of 10 minutes. Both are adjusted for precession.
Range is the straight-line distance in kilometers. It is truncated to
an integer. (Truncation drops the fractional part, thereby creating
an error of up to 1 in the last place. On the other hand, rounding
guarantees an error of 1/2 the rounding precision or less.)
"Sun" is the elevation of the sun above the satellite's geometrical
horizon (i.e., the horizon adjusted for dip due to satellite height
but not for refraction), rounded to the nearest degree. A positive
number indicates that the satellite is in sunlight. Since the horizon
dip in low earth orbit may be 30 degrees or more, the "sun" value can
considerably exceed 90 degrees.
The magnitude is an estimate based on the satellite absolute
magnitude, the phase (illumination) angle, and range. If SEESAT
senses a Molczan-format element file, it automatically extracts the
absolute magnitude. Otherwise, you may enter it via the MAG command.
If no absolute magnitude has been input, the displayed magnitude is
prefixed with a *, indicating that this is a "relative magnitude" with
respect to the standard conditions of 1000 km range and 90 degrees
phase angle. E.g., "* -.6" means that the satellite will be about .6
mag brighter than it would be at 1000 km and 90 degrees phase angle.
You can change the range and phase angle corresponding to relative
magnitude 0. Use the MAGBIAS command and the formula in its
description. But note that the MAGBIAS value will still be in effect
if you enter an absolute magnitude.
Altitude is in km, truncated to an integer. It assumes a spherical
earth 6371 km in diameter.
Latitude and longitude are rounded to the nearest .1 degree. Latitude
is the geocentric latitude. Longitude may be made to read with
respect to Greenwich or your local meridian, toggled with the
MERIDIAN command.
8. Batch Files
A batch file is an ASCII file containing commands for SEESAT. Lines
may be up to 80 characters long. Any command which is legal to enter
at the > prompt may be placed in a batch file. The file may be any
length. A batch file is executed by typing EX <filename>.
If SEESAT finds EX in a batch file, any remaining commands on the
line are executed normally, the current batch file is closed, the new
one is opened, and it begins execution. Control will NOT return to
the old batch file.
At startup, SEESAT looks for file SEESAT.BAT. If present, it is
executed automatically as a normal batch file. For example, my
SEESAT.BAT contains:
height .73 lat 34.915 lon -117.933 zone -800
start 1992 jan 1 0 length 15
meridian
This begins by setting my location and time zone. Then the START
command establishes a default year and month. (Any command that
requires a <date time> argument would do the same.) The day and time
(1st of month at midnight) are dummy values; I only have them there
because it's illegal to omit them. They could be any value. To
prevent START from triggering a prediction run, I follow it with a
command to set the max name length to 15. Finally, I prefer to have
satellite longitudes with respect to my local meridian, so "meridian"
toggles SEESAT to the correct mode.
This version of SEESAT introduces the PRINT?, REPEAT, and SKIP
commands for controlled iteration. For example, the following
commands will step through a file, returning control to you if 1) a
prediction above the horizon occurs, or 2) end of element file is
reached.
START 1991 OCT 20 1900 SPAN 200 STEP 8 OPEN 897.ELE
NEXT RUN PRINT? SKIP REPEAT
The first line sets up our prediction run parameters. Since any of
the parameter-setting commands will trigger a run if it is at the end
of the line, I place the OPEN command there. The second line does the
iterating. It uses NEXT to load the next element set, performs a
prediction run, then executes PRINT?. PRINT? checks if a line of data
has been printed. If true, the next command executes. If false,
execution jumps over the next command.
Iterating command lines may also be placed in batch files. For
example, you could check a file for visible satellites with the
following batch file:
NEXT START 1900 SPAN 200 STEP 8 RUN PRINT? RETURN REPEAT
Suppose that line is a batch file named A. You'd invoke it as follows:
START 1991 OCT 20 0 OPEN 897.ELE EX A
The START command on this line is just to set up the default date.
That allows you to omit date from the batch file so you can use the
same one day after day. The batch file will keep loading and running
predictions until something comes over the horizon. It then does a
RETURN, at which point you can manually explore the pass in more
detail. To resume checking the file just type EX A. (You can't
use RET, since the single line in the batch file has already been
executed.)
A batch file can also check a specific list of satellites. For
example,
LOAD "NADEZHDA 1"
START 1900 STOP 2100 STEP 10 RUN PRINT? RETURN
LOAD "NADEZHDA 2"
START 1900 STOP 2100 STEP 10 RUN PRINT? RETURN
LOAD "NADEZHDA 3"
START 1900 STOP 2100 STEP 10 RUN PRINT? RETURN
will, with proper lead-in commands, check the evening for passes of
these satellites. In this case, you'd use RET to go back to the
batch file after exploring each visible pass.
Element File Format
Each orbital element set comprises three lines in the following format. (The
fourth line here is a ruler to help you count characters and is not present
in an actual element set.) A file may contain any number of these element
sets. Blank lines are allowed, but any other extraneous lines (titles,
comments, etc.) are NOT PERMITTED!
CCCCCCCCCCCCCCCCCCCCCC -N.N
1 NNNNN.NNNNNNNN -.NNNNNNNN -NNNNN-N N
2 NNN.NNNN NNN.NNNN NNNNNNN NNN.NNNN NNN.NNNN NN.NNNNNNNN N
123456789 123456789 123456789 123456789 123456789 123456789 123456789
C can be any character
N is any digit.
- represents either a hyphen or a space.
The first line is the name of the satellite. The line may any length,
but only the first 22 characters are recognized as the name. (22 is
the default; it may be changed to anything from 1 to 22 via the LENGTH
command.) Trailing spaces are removed from the name and it is
converted to upper case before it is placed in the index.
During loading of an element set, SEESAT checks the length of the name
line. If it is longer than 31 characters, it is assumed to be a
Molczan-format name line, and the field beginning at character 31 must
contain the satellite absolute magnitude. See the diagram above.
The second and third lines are the standard Two-Line Orbital Element Set
Format used by NASA and NORAD. The format description is:
Line 2
Column Description
1 Must be digit 1
19 - 20 Epoch Year (Last two digits of year)
21 - 32 Epoch (Julian Day and fractional portion of the day)
34 - 43 First Time Derivative of the Mean Motion
54 - 59 BSTAR drag term (decimal point assumed before 54)
60 - 61 power of 10 to multiply BSTAR by
69 Check Sum (Modulo 10)
Line 3
1 Must be digit 2
9 - 16 Inclination [Degrees]
18 - 25 Right Ascension of the Ascending Node [Degrees]
27 - 33 Eccentricity (decimal point assumed before 27)
35 - 42 Argument of Perigee [Degrees]
44 - 51 Mean Anomaly [Degrees]
53 - 63 Mean Motion [Revs per day]
69 Check Sum (Modulo 10)
The NORAD 2-Line element sets contain other fields, but the
above are the only ones used by SEESAT. First derivative of mean
motion is not used if BSTAR is present. Except for BSTAR, leading
and trailing zeros are not required.
Compiling SEESAT
The source code is in seven files:
SEESAT.H
SEESAT.C (only 2 lines)
DRIVER.C
UTIL.C
SGP4.C
ASTRO.C
READEL.C
Check the "Misc Dependencies" section in SEESAT.H. You may have to
make changes. Every C file has a #include for SEESAT.H; you may have
change my driver specifier so your compiler will find SEESAT.H.
References
Robert M. L. Baker, Jr. and Maud W. Makemson, "An Introduction to
Astrodynamics", Academic Press Inc., New York, 1960
W. Gellert, H. Kustner, M. Hellwich, H. Kastner, "The VNR Concise
Encyclopedia of Mathematics", Van Nostrand Reinhold Co., 1975
Robin M. Green, "Spherical Astronomy", Cambridge University Press, 1985
Jean Meeus, "Astronomical Formulae for Calculators", 3rd ed.,
Willmann-Bell Inc, Richmond, Va., 1985
"American Practical Navigator", Vol. I & II, Defense Mapping Agency
Hydrographic/Topographic Center, Washington, D.C., 1984, 1981 respectively
Felix R. Hoots and Ronald L. Roehrich, "Spacetrack Report No. 3", Office of
Astrodynamics, Peterson AFB, 1980
U.S. Naval Observatory, "Nautical Almanac 1992", Washington, D.C., 1991
Finally, thanks to the people who contributed suggestions, reference
materials, and testing time to SEESAT:
Rocky Harper
TS Kelso
Ted Molczan
Rick Welch
John Williams
Walt Witherspoon
o your compiler will find SEESAT.H.